package system;

public class Config {
	public static short SERVER_PORT;
	public static int WIN_SCORE = 10;
	public static int LOSE_SCORE = 0;
	public static int INIT_SCORE = 0;
	public static int TOP_COUNT = 50;
	public static int refreshMax = 30;
	public static int challengeMax = 30;
	public static int PVP_RANDOM_COUNT_PER_LEVEL = 4;
	public static int[] gradeScore = {0, 100, 200, 400, 700, 1000, 1600, 2400, 3300, 4000, 5000, 6500, 8000, 10000, 12600, 30000, 50000};
	public static int maxScore = Config.gradeScore[Config.gradeScore.length-1];
	public static int CHALLENGE_RECORD_CAPACITY = 15;
	public static int GIFT_COIN = 10000;
	public static int GIFT_DIAMOND = 100;
	public static int GIFT_ITEM_IDs[] = {};
	public static int GIFT_ITEM_COUNTs[] = {};
	public static int GIFT_EQUIP_IDs[] = {};
	public static int GIFT_PET_IDs[] = {40};
	public static int PURCHASE_LIST[] = {100, 550, 1150, 6500, 14000};
    public static String VERIFY_HOST = "buy.itunes.apple.com";
    public static String VERIFY_PATH = "/verifyReceipt";
    public static long KICK_CACHE_TIME = (long)1000 * (long)60 * (long)60 * (long)24 * (long)30;
    public static long CACHE_MAX_COUNT = 200000;
    public static long CLEAR_CACHE_INTERVAL = (long)1000 * (long)60 * (long)60 * (long)24 * (long)5;
    public static int DATA_LENGTH_MAX = 1024*1024;
    public static int IDEL_TIME_SECEND = 120;
    public static int VERSION = 1;
    public static String[] SERVER_ADDRS = {"192.168.1.106", "192.168.1.111"};
    public static int[] SERVER_PORTS = {12222, 12222};
    public static int[] SERVER_STATES = {0, 0};
    public static int SERVER_STATE = 0;
    public static int NAME_LEN_LIMIT = 12;
    public static int NET_TIME_OUT = 60;
    public static int MIN_MEM = 128 * 1024;
    public static byte OPEN_VIP = 1;
    public static int PVP_RANK_CAPACITY = 5000;
    public static int RANDOM_GRADE_MAX = 2000;
    public static int OUT_RANK = 50000;
    public static String PRODUCT_ID = "com.o2sun.ArdaStoryTraditional";
    public static boolean stopNet = false;
    
    public static String APP_ID_91 = "108893";
    public static String APP_KEY_91 = "a839f62764cdbd9e4ca41b8a6a760a00fd8ad0d52a2dabfb";    
    public static boolean APP_91 = false;
    
	public static int getPVPLevel(int score) {
		int i = 1;
		for (i = 1; i < Config.gradeScore.length; i++) {
			if (score < Config.gradeScore[i]) {
				return i - 1;
			}
		}
		return i - 1;
	}
    
//    public static long KICK_CACHE_TIME = 1000 * 10;
//    public static long CACHE_MAX_COUNT = 10;
//    public static long CLEAR_CACHE_INTERVAL = 1000 * 10;
}
